﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using HYCoordinate;

namespace SetPipe.Utiltiy
{
	public class OnePipeInputDataPacker : InputDataPackerBase
	{
		public OnePipeInputDataPacker(XYZ inputPoint, int cornerKindIndex, Dictionary<int, double> inputParameter, int familyFileIndex = -1)
		{
			foreach (KeyValuePair<int, double> keyValuePair in inputParameter)
			{
				if (0.0 >= keyValuePair.Value)
				{
					throw new CornerMakerException(StaticRescource.StrError_WrongParameter);
				}
			}
			this.useFamilyFileIndexs.Clear();
			this.useFamilyFileIndexs.Add(familyFileIndex);
			this.lstPoints.Clear();
			this.lstPoints.Add(inputPoint);
			this.cornerKind = (CornerKindEnum)cornerKindIndex;
			this.lstPipeInputParameter.Clear();
			this.lstPipeInputParameter.Add(base.PipeTransDicParam(inputParameter));
		}
	}
}
